package com.cy.myblog.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Created by Administrator on 2015/7/13.
 */
@Entity
@Table(name = "tmenu")
public class Tmenu implements java.io.Serializable
{

    private static final long serialVersionUID = -6632764454349520013L;
    private int        id;       //编号
    private int        pid;      //父级编号
    private String     name;     //资源名称
    private String     url;      //地址
    private String     click;    //页面单击事件
    private String     parameter;//页面执行参数
    private int        seqID;    //序号
    private int        operat;   //0:启用 1:删除 10:停用
    private String     memo;     //备注
    private String     icon;     //图标

    // Constructors

    /** default constructor */
    public Tmenu()
    {
    }

    /** minimal constructor */
    public Tmenu(int id)
    {
        this.id = id;
    }

    /** full constructor */
    public Tmenu(int id, int pid, int seqID, String name, String parameter, String icon, String memo)
    {
        this.id = id;
        this.pid = pid;
        this.seqID = seqID;
        this.name = name;
        this.parameter = parameter;
        this.icon = icon;
        this.memo = memo;
    }

    @Id
    @Column(name = "id", unique = true, nullable = false, length = 36)
    public int getId()
    {
        return this.id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    @Column(name = "name", length = 100)
    public String getName()
    {
        return this.name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @Column(name = "url", length = 200)
    public String getUrl()
    {
        return this.url;
    }

    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getClick() {
        return click;
    }

    public void setClick(String click) {
        this.click = click;
    }

    public String getParameter() {
        return parameter;
    }

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getSeqID() {
        return seqID;
    }

    public void setSeqID(int seqID) {
        this.seqID = seqID;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getOperat() {
        return operat;
    }

    public void setOperat(int operat) {
        this.operat = operat;
    }

    @Override
    public String toString() {
        return "Tmenu{" +
                "id=" + id +
                ", pid=" + pid +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", click='" + click + '\'' +
                ", parameter='" + parameter + '\'' +
                ", seqID=" + seqID +
                ", operat=" + operat +
                ", memo='" + memo + '\'' +
                ", icon='" + icon + '\'' +
                '}';
    }
}
